/*
 */

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/antborrow-mgr/busguarantee/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/antborrow-mgr/busguarantee',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/antborrow-mgr/busguarantee/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/antborrow-mgr/busguarantee/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/antborrow-mgr/busguarantee',
    method: 'put',
    data: obj
  })
}

export function downFile(name) {
  return request({
    url: '/admin/file/antborrow-' + name,
    method: 'get',
    responseType: 'blob'
  })
}

export function createGua(busDate) {
  return request({
    url: '/antborrow-mgr/busguarantee/createGua?busDate=' + busDate,
    method: 'get',
  })
}

export function sendEmail(guaId) {
  return request({
    url: '/antborrow-mgr/busguarantee/sendEmail?guaId=' + guaId,
    method: 'get',
  })
}

export function sendSms(busDate) {
  return request({
    url: '/antborrow-mgr/busguarantee/sendSms?busDate=' + busDate,
    method: 'get',
  })
}
